<?php
/**
 * This file is part of webman.
 *
 * Licensed under The MIT License
 * For full copyright and license information, please see the MIT-LICENSE.txt
 * Redistributions of files must retain the above copyright notice.
 *
 * @author    walkor<walkor@workerman.net>
 * @copyright walkor<walkor@workerman.net>
 * @link      http://www.workerman.net/
 * @license   http://www.opensource.org/licenses/mit-license.php MIT License
 */

use think\Env;

return [
    'default' => 'mysql',
    'default_query_cache_time' => Env::get("DEFAULT_QUERY_CACHE_TIME", 0),
    'database_max_select_rows' => Env::get("database_max_select_rows"),
    'connections' => [
        'mysql' => [
            'driver' => 'mysql',
            'host' => Env::get("database_host"),
            'port' => Env::get("database_port"),
            'database' => Env::get("database_name"),
            'username' => Env::get("database_user"),
            'password' => Env::get("database_password"),
            'unix_socket' => '',
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_general_ci',
            'prefix' => '',
            'strict' => true,
            'engine' => null,
            'debug' => Env::get("database_debug", false),
            'read_data_map' => true
        ],
    ],
    'mysql_saas' => [
        'db_type' => 'mysql',
        'driver' => 'mysql',
        'db_host' => Env::get("saas_database_host"),
        'db_port' => Env::get("saas_database_port"),
        'db_name' => Env::get("saas_database_name"),
        'db_user' => Env::get("saas_database_user"),
        'db_pwd' => Env::get("saas_database_password"),
        'unix_socket' => '',
        'db_charset' => 'utf8mb4',
        'collation' => 'utf8mb4_general_ci',
        'prefix' => '',
        'strict' => true,
        'engine' => null,
        'db_debug' => Env::get("database_debug", false),
        'read_data_map' => true
    ],
];
